package com.nightwalkbuddy.service;

import com.nightwalkbuddy.dto.MapPair;

/**
 * interface class
 * @author - htisabel
 */
public interface IPathService {

	/**
	 * save the GPS point into the current path
	 * 
	 * @param latitude double
	 * @param longitude double
	 */
	public void pointToPath(double latitude, double longitude) throws Exception;

	/**
	 * if user selects a campus location as destination, calculate path and
	 * deviation The calculated data is then used to compare with the user
	 * walking path
	 * 
	 * @param startGPS
	 *            current user lat/long obtained through GPS service
	 * @param finishGPS
	 *            campus destination lat/long obtained from user
	 */
	public void setDestination(MapPair<Double, Double> startGPS,
			MapPair<Double, Double> finishGPS);

	/**
	 * print all GPS points along the path
	 * 
	 * @return String value of all GPS point along the path
	 */
	public String printPathPoints() throws Exception;

	/**
	 * retrieve complete path saved in MapPath used to save into SQLiteDB
	 * delimeted String is used to preserve lat/long in double 
	 * 
	 * @return collection of lat/long records delimited using comma
	 * @throws Exception
	 *             NullPointerException
	 */
	public String getCompletePath() throws Exception;

	/**
	 * track user current GPS location compare path and devi to confirm whether
	 * the user is astray from expected path
	 * 
	 * @return boolean true if user is right on the path
	 */
	public boolean isOnPath();

	/**
	 * track user current path every time GPS service updates
	 * 
	 * @return String path lat/long combo delimited with comma for each path
	 *         point
	 */
	public String getPathInProgress();

}
